<?php

define("DBVERSION","1.0");

$dbTables = array (
	"sourcefiles" => $db_prefix . "source",
	"sourcefolders" => $db_prefix . "sourcefolders",
        "config" => $db_prefix . "config",
        "banners" => $db_prefix . "banners",
        "banner_images" => $db_prefix . "banner_images"
);

$dbStructure = array(
    "sourcefiles" => array(
        "id" => array("integer not null primary key auto_increment","ID"),
        "source" => array("integer not null", "source folder id"),
        "filename" => array("varchar(255) not null","FileName"),
        "xresolution" => array("integer not null", "Width"),
        "yresolution" => array("integer not null", "Height"),
        "used_count" => array("integer not null", "Count of times file used"),
        "permission" => array("integer", "control use of this image")
    ),
    "sourcefolders" => array(
        "id" => array("integer not null primary key auto_increment","ID"),
        "sourcefolder" => array("integer not null", "Source Folder")
    ),
    "config" => array(
        "id" => array("integer not null primary key auto_increment","ID"),
        "name" => array("varchar(255) not null", "KeyName"),
        "value" => array("integer not null", "Value")
    ),
    "banner_images" => array(
        "id" => array("integer not null primary key auto increment", "ID"),
        "banner_id" => array("integer not null", "BannerID"),
        "source_id" => array("integer not null", "SourceID")
    ),
    "banners" => array(
        "id" => array("integer not null primary key auto_increment","ID"),
        "filename" => array("varchar(255) not null","FileName"),
        "xresolution" => array("integer not null", "Width"),
        "yresolution" => array("integer not null", "Height")
    )
);


?>
